<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    request.setAttribute("basePath",basePath);
%>
<%@ include file="/resources/js/easyui/taglibs.jsp"%>
<%@ include file="/resources/js/wechat/_wechatui.jsp"%>
<!DOCTYPE>
<html>
	<head>
		<title>提现记录</title>

	</head>
	<body>
		<div class="loading"></div>
		<!-- header -->
		<header>
			<a href="javascript:history.go(-1);" class="top_fh">提现记录</a>
		</header>
		<!-- header end -->
		
		<div class="page nb_page">
			<div class="my_txinner">
				<ul>
						 <c:if test="${!empty balances}">
						
						<c:forEach var="entry" items="${balances.rows}" varStatus="index">
						<li>
								<p><span>微信</span><em>${entry.lostmoney/100}</em></p>
								<c:choose>
								   <c:when test="${entry.loststatus== 0}">  
										<p>未到账</p>
								   </c:when>
								   <c:otherwise> 
										<p>已到账</p>
								   </c:otherwise>
								</c:choose>
								<p><time><fmt:formatDate value="${entry.receivetime}" pattern="yyyy/MM/dd  HH:mm:ss" /></time></p>
							</li>
						</c:forEach>
						</c:if>
					
				</ul>
			</div>
		</div>

	</body>
</html>
<script>

$(function(){
	//登录
	$(".lg_button a").on("click", function(){
		var username = $("#username").val();	
		var password = $("#password").val();	
		var vaild = $("#valid").val();


		if(username==null||username==''){
			alert("用户名不能为空");
		}else if(password==null||password==''){
			alert("密码不能为空");
		}else if(vaild==null||vaild==''){
			alert("验证码不能为空");
		}else{
			$("#loginpassword").val(createPassword(password,password));
			$.ajax({
				url:'${basePath}wechat/login/signin',
				type : 'POST',
				data : $("#myForm").serialize(),
				error: function (response) {
					ViewHelper.func.ajaxWechatErrorMessage(response);
				},
				success: function (ret) {
					if(ret.result) {
						window.location = "${basePath}wechat/income/accounts/mainView";
					}else{
						alert(ret.info);
					}
				}
			}); 
			
		}
				
	});

});
</script>
